package com.xnx3.wangmarket.plugin.api.entity;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Id;
import javax.persistence.Index;
import javax.persistence.Table;

/**
 * 客服嵌入，将客服系统嵌入进别人的系统中，让别人的系统快速拥有客服功能。
 * 这里是别人系统的普通用户对应客服平台的User普通用户表
 */
@Entity
@Table(name = "kefu_inset_user", indexes={@Index(name="suoyin_index",columnList="userid,other_userid")})
public class InsetUser implements java.io.Serializable {
	
	private Integer id;		//自动编号
	private String otherUserid;		//别人平台的user.id，限制64个字符或以内的字符
	private Integer userid;			//别人平台的用户对应到自己客服系统的客服平台的user.id.这是客服平台自己的user.id

	@Id
	@GeneratedValue(strategy = IDENTITY)
	@Column(name = "id", unique = true, nullable = false)
	public Integer getId() {
		return this.id;
	}

	public void setId(Integer id) {
		this.id = id;
	}
	
	@Column(name = "other_userid", columnDefinition="char(64) comment '别人平台的user.id，限制64个字符或以内的字符' ")
	public String getOtherUserid() {
		return otherUserid;
	}

	public void setOtherUserid(String otherUserid) {
		this.otherUserid = otherUserid;
	}
	
	@Column(name = "userid", columnDefinition="int(11) comment '别人平台的用户对应到自己客服系统的客服平台的user.id.这是客服平台自己的user.id' ")
	public Integer getUserid() {
		return userid;
	}

	public void setUserid(Integer userid) {
		this.userid = userid;
	}

	@Override
	public String toString() {
		return "InsetUser [id=" + id + ", otherUserid=" + otherUserid + ", userid=" + userid + "]";
	}
	
}